/**
 * @Author: Sagan
 * @Date: 2020/09/19 11:45
 */
package constant

import "errors"

var (
	ERROR_INVALID    = errors.New("Invalid data type")
	ERROR_EMPTY_RULE = errors.New("Rule cannot be empty") // 弃用
)

// bool
var (
	ERROR_BOOL_TRUE_UDT  = errors.New("'boolean:true' rule unsupported data type")
	ERROR_BOOL_FALSE_UDT = errors.New("'boolean:false' rule unsupported data type")
)

// length
var (
	ERROR_LENGTH_UDT   = errors.New("'length' rule unsupported data type")
	ERROR_LENGTH_PARAM = errors.New("Missing or wrong parameter for 'length' rule")
)

// max
var (
	ERROR_MAX_UDT   = errors.New("'max' rule unsupported data type")
	ERROR_MAX_PARAM = errors.New("Missing or wrong parameter for 'max' rule")
)

// min
var (
	ERROR_MIN_UDT   = errors.New("'min' rule unsupported data type")
	ERROR_MIN_PARAM = errors.New("Missing or wrong parameter for 'min' rule")
)

// require
var (
	ERROR_REQUIRE_UDT = errors.New("'require' rule unsupported data type")
)

// ip
var (
	ERROR_IP_UDT   = errors.New("'ip' rule unsupported data type")
	ERROR_IPV4_UDT = errors.New("'ipv4' rule unsupported data type")
	ERROR_IPV6_UDT = errors.New("'ipv6' rule unsupported data type")
)

// json
var (
	ERROR_JSON_UDT   = errors.New("'json' rule unsupported data type")
)

// regex
var (
	ERROR_EMAIL_UDT      = errors.New("'email' rule unsupported data type")
	ERROR_ALPHA_UDT      = errors.New("'alpha' rule unsupported data type")
	ERROR_ALPHA_NUM_UDT  = errors.New("'alphaNum' rule unsupported data type")
	ERROR_ALPHA_DASH_UDT = errors.New("'alphaDash' rule unsupported data type")
)

// chs
var (
	ERROR_CHS_UDT = errors.New("'chs' rule unsupported data type")
)

// chsNum
var (
	ERROR_CHS_NUM_UDT = errors.New("'chsNum' rule unsupported data type")
)

// chsAlpha
var (
	ERROR_CHS_ALPHA_UDT = errors.New("'chsAlpha' rule unsupported data type")
)

// chsAlphaNum
var (
	ERROR_CHS_ALPHA_NUM_UDT = errors.New("'chsAlphaNum' rule unsupported data type")
)

// chsDash
var (
	ERROR_CHS_DASH_UDT = errors.New("'chsDash' rule unsupported data type")
)

// in
var (
	ERROR_IN_UDT   = errors.New("'in' rule unsupported data type")
	ERROR_IN_PARAM = errors.New("Missing or wrong parameter for 'in' rule")
)

// notIn
var (
	ERROR_NOT_IN_UDT   = errors.New("'notIn' rule unsupported data type")
	ERROR_NOT_IN_PARAM = errors.New("Missing or wrong parameter for 'notIn' rule")
)

// between
var (
	ERROR_BETWEEN_UDT   = errors.New("'between' rule unsupported data type")
	ERROR_BETWEEN_PARAM = errors.New("Missing or wrong parameter for 'between' rule")
)

// notBetween
var (
	ERROR_NOT_BETWEEN_UDT   = errors.New("'notBetween' rule unsupported data type")
	ERROR_NOT_BETWEEN_PARAM = errors.New("Missing or wrong parameter for 'notBetween' rule")
)

// eq
var (
	ERROR_EQ_UDT   = errors.New("'eq' rule unsupported data type")
	ERROR_EQ_PARAM = errors.New("Missing or wrong parameter for 'eq' rule")
)

// neq
var (
	ERROR_NEQ_UDT   = errors.New("'neq' rule unsupported data type")
	ERROR_NEQ_PARAM = errors.New("Missing or wrong parameter for 'neq' rule")
)

// gt
var (
	ERROR_GT_UDT   = errors.New("'gt' rule unsupported data type")
	ERROR_GT_PARAM = errors.New("Missing or wrong parameter for 'gt' rule")
)

// gte
var (
	ERROR_GTE_UDT   = errors.New("'gte' rule unsupported data type")
	ERROR_GTE_PARAM = errors.New("Missing or wrong parameter for 'gte' rule")
)

// lt
var (
	ERROR_LT_UDT   = errors.New("'lt' rule unsupported data type")
	ERROR_LT_PARAM = errors.New("Missing or wrong parameter for 'lt' rule")
)

// lte
var (
	ERROR_LTE_UDT   = errors.New("'lte' rule unsupported data type")
	ERROR_LTE_PARAM = errors.New("Missing or wrong parameter for 'lte' rule")
)

// 不支持的规则
func NewRuleNotSup(rule string) error {
	return errors.New("'" + rule + "' rule not supported")
}
